#!/usr/bin/env python3

import sys
from PyQt4 import QtCore, QtGui, uic
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import res.qrc_ui
from session import Session
uiName = 'view/note.ui'


class NoteWindow(QtGui.QMainWindow):
    
    def __init__(self, parent=None):
        #QtGui.QWidget.__init__(self, parent)
        super(NoteWindow, self).__init__(parent)
        uic.loadUi(uiName, self)
        self.center()
        #print(Session().getAttribute('user'))
        for i in range(10):
            self.textEdit_2 = QtGui.QTextEdit(self.noteListView)
            self.textEdit_2.setObjectName("textEdit_2")
            
            self.gridLayout.addWidget(self.textEdit_2, i+1, 0, 1, 1)

    def center(self):
        screen = QtGui.QDesktopWidget().screenGeometry()
        size =  self.geometry()
        self.move((screen.width()-size.width())/2, (screen.height()-size.height())/2)


if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    view = NoteWindow()
    view.show()
    sys.exit(app.exec_())